home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / windows / wbt31a.zip / DOSPASTE.WB$ < prev    next >
Text File  |  1991-02-17  |  1KB  |  28 lines

  1. ; An Example of pasting data to a DOS window
  2. ; We will paste DIR and CHKDSK, PAUSE and EXIT to as DOS window
  3.  
  4.  
  5.  if !(WinConfig() & 32) then goto NOGO     ; Check for 386 enhanced mode
  6.  
  7.  Pause("Please Note:","This WBT file starts a command.com window.  Type EXIT to close the window.")
  8.  
  9.  ReturnKey=Strcat(num2char(13))            ; Setup variable with <enter> in it.
  10.  
  11.                                            ; Type DIR and then CHKDSK,
  12.                                            ; each with a return
  13.  CommandToType="DIR %ReturnKey% CHKDSK %ReturnKey%"  
  14.  
  15.  ClipPut(CommandToType)                    ; Stuff command to type into clipbrd
  16.  RunIcon(Environment("COMSPEC"),"")        ; Get command.com from COMSPEC
  17.                                            ; in environment
  18.  WinActivate("COMMAND")                    ; Activate the COMMAND window
  19.  SendKey("! TW~")                          ; Sendkey to set "windowed" mode
  20.                                            ; ...not full screen
  21.  WinShow("COMMAND")                        ; Open up the icon
  22.  SendKey("! EP")                           ; SendKey Alt-Space Edit Paste
  23.  Exit                                      ; Byebye
  24.  
  25.  
  26.  :NOGO                                     ; Hmmm not 386 enhanced mode...
  27.  Message("Ooops!","Can only paste to DOS apps when in 386 enhanced mode")
  28.